All Questions
Tagged with java8performance
2 questions
16votes
1answer
29kviews
Is Collection.stream().filter().forEach() inefficient compared to a standard for each loop?
IntelliJ IDEA recommended to me just now to replace the following for-each loop with a Java 8 "forEach" call: for (Object o : objects) { if (o instanceof SomeObject) { ...
71votes
3answers
34kviews
Is there a performance benefit to using the method reference syntax instead of lambda syntax in Java 8?
Do method references skip the overhead of the lambda wrapper? Might they in the future? According to the Java Tutorial on Method References: Sometimes... a lambda expression does nothing but call an ...